package com.shumi.rbac.web;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.shumi.rbac.model.User;
import com.shumi.rbac.service.SystemService;

@RestController
@RequestMapping(value="/khlb")
public class KhlbController {
	
	@Autowired
	SystemService systemService;
	
	//查询考核列表展示
		@ResponseBody
		@RequestMapping(value="/findAll")
		public Map khlbFindAll(HttpSession session){
			Map map=new HashMap();
			Object object=session.getAttribute("user");			
			User user=(User)object;
			String userId=user.getUserId();
			map.put("data", systemService.khFindAll(userId));
			map.put("status", "200");
			return map;	
		}
		
		// 查询考核列表-用户详情展示
		@ResponseBody
		@RequestMapping(value="/detail")
		public Map  Khlbdetail(String id){
			Map map=new HashMap();
			map.put("data", systemService.khdetail(id));
			map.put("status", "200");
			return map;
			
		}

}
